rust: Fix a few warnings
authorColin Walters <walters@verbum.org>
Tue, 22 Jul 2025 14:52:45 +0000 (10:52 -0400)
committerColin Walters <walters@verbum.org>
Tue, 22 Jul 2025 14:53:31 +0000 (10:53 -0400)
- Unused imports because we weren't actually exporting the structs
  from those modules
- glib prelude is empty now?
- mount namespace usage is conditional

Signed-off-by: Colin Walters <walters@verbum.org>
rust-bindings/src/lib.rs
rust-bindings/src/sysroot.rs

index 9b60dd544d0fe16154dfed7906d394b96fdcbca1..8013c4cfb62734954c50bed23459461c6d498622 100644 (file)
@@ -41,11 +41,10 @@ pub use constants::*;
 
 #[cfg(any(feature = "v2018_6", feature = "dox"))]
 mod collection_ref;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-pub use crate::collection_ref::*;
 mod functions;
 pub use crate::functions::*;
 mod mutable_tree;
+#[allow(unused_imports)]
 pub use crate::mutable_tree::*;
 #[cfg(any(feature = "v2019_3", feature = "dox"))]
 #[allow(missing_docs)]
@@ -67,11 +66,10 @@ pub use crate::repo_checkout_at_options::*;
 mod repo_transaction_stats;
 pub use repo_transaction_stats::RepoTransactionStats;
 mod se_policy;
+#[allow(unused_imports)]
 pub use crate::se_policy::*;
 #[cfg(any(feature = "v2020_1", feature = "dox"))]
 mod commit_sizes_entry;
-#[cfg(any(feature = "v2020_1", feature = "dox"))]
-pub use crate::commit_sizes_entry::*;
 #[cfg(any(feature = "v2017_4", feature = "dox"))]
 mod sysroot_write_deployments_opts;
 #[cfg(any(feature = "v2017_4", feature = "dox"))]
@@ -92,5 +90,6 @@ pub mod prelude {
     #[doc(hidden)]
     pub use gio::prelude::*;
     #[doc(hidden)]
+    #[allow(unused_imports)]
     pub use glib::prelude::*;
 }
index 30bccd02270a556f0ba66126fd47607015187dea..7169057b029633181ad6d5e52b66c4408aa35fd9 100644 (file)
@@ -8,6 +8,7 @@ use std::path::PathBuf;
 /// Builder object for `Sysroot`.
 pub struct SysrootBuilder {
     path: Option<PathBuf>,
+    #[cfg(any(feature = "v2020_1", feature = "dox"))]
     mount_namespace_in_use: bool,
 }